<template>
	<view style="display: flex;background-color: #fff;border-radius: 5px;margin: 5px;">
		<image class="image" :src="sConf.pics + (product.cover ?? [])[0]?.url" mode="scaleToFill"
			style="border-radius: 5px 0 0 5px;width: 96px;height: 128px;flex-basis:96px;" />
		<view style="display: flex;flex-direction: column;justify-content: space-between;padding: 5px;flex: 1;">
			<view style="font-size: x-small; text-wrap: wrap;"> {{ product.name }} </view>
			<view style="display: flex;gap: 2px;">
				<tn-icon v-if="product.is_share === 1" name="fire" color="#ff9a44" size="32"></tn-icon>
				<tn-icon v-if="product.is_master === 1" name="lucky-money" color="#ff6b6b" size="32"></tn-icon>
				<tn-icon v-if="product.exp > 0" name="flower" color="#96c93d" size="32"></tn-icon>
				<tn-icon v-if="product.point > 0" name="funds" color="#01beff" size="32"></tn-icon>

				<!-- 停用
				<tn-tag v-if="product.is_master === 1" type="info" shape="round" font-size="16" bg-color="#ff9a44"
					text-color="#fff">Rep</tn-tag>
				<tn-tag v-if="product.is_share === 1" type="info" shape="round" font-size="16" bg-color="#ff6b6b"
					text-color="#fff">Hot</tn-tag>
				<tn-tag v-if="product.exp > 0" type="info" shape="round" font-size="16" bg-color="#01beff"
					text-color="#fff">Exp</tn-tag>
				<tn-tag v-if="product.point > 0" type="info" shape="round" font-size="16" bg-color="#96c93d"
					text-color="#fff">Pot</tn-tag>
				-->
			</view>
			<view v-if="product.is_money == 1" class="price"
				style="display: flex;justify-content: space-between;align-items: center;">
				<view>
					<tn-icon name="money" size="16px"></tn-icon>
					<text style="color: #dd524d;padding: 0 5px;font-size: small;">{{ (product.price.price /
						100).toFixed(2) }}</text>
				</view>
			</view>
			<view style="font-size: x-small;color: #999;"> 热销: {{ product.hot ? product.hot : 0 }} 件</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			sConf: getApp().globalData,
		}
	},
	props: {
		product: {
			type: Object
		}
	},
	methods: {

	}
}
</script>

<style></style>